package com.tarena.lbs.article.web.controller;

import com.tarena.lbs.article.web.service.ArticleCategoryService;
import com.tarena.lbs.base.protocol.model.Result;
import com.tarena.lbs.base.protocol.pager.PageResult;
import com.tarena.lbs.pojo.content.vo.ArticleCategoryVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 负责文章分类相关功能
 */
@RestController
@Slf4j
public class ArticleCategoryController {
    @Autowired
    private ArticleCategoryService articleCategoryService;
    //查询 文章可用分类列表数据
    @GetMapping("/admin/content/category/list")
    public Result<PageResult<ArticleCategoryVO>> pageList(){

        return new Result<>(articleCategoryService.pageList());
    }
}
